﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class sys_modipwd : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        tb_password.Text = "";
        tb_re_password.Text = "";
        tb_s_password.Text = "";
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        string sp = tb_s_password.Text;
        string username;
        if (Request["un"] == null)
        {
            username = Session["username"].ToString();
        }
        else
        {
            username = Request["un"];
        }
        if (MasApp.BLL.Check.CheckPassword(username, sp))
        {

            string p = tb_password.Text;
            MasApp.BLL.Update.UpdatePassword(username, p);
            MasApp.BLL.ResponseHelper.alert("修改成功！请妥善保管新密码！");
        }
    }
}
